import request from '@/utils/request'

// 用人单位 - 企业列表
export function getEmployerList(query) {
  return request({
    url: '/occupational/enterprise/list', 
    method: 'get',
    params: query
  })
}
//用人单位人员列表
export function getPersonnelList(query) {
  return request({ 
    url: '/occupational/enterprise/personnel/list',  
    method: 'get',
    params: query
  })
}

// 查看职业健康检查数据
export function getHealthExamination(query) {
  return request({
    url: '/occupational/enterprise/personnel/healthReport/list', 
    method: 'get',
    params: query
  })
}

// 查看企业体检结果告知书
export function getPhysicalExamination(query) {
  return request({
    url: '/occupational/enterprise/personnel/examNotice/list', 
    method: 'get',
    params: query
  })
}

// 查看调岗材料
export function getTransferMaterial(query) {
  return request({
    url: '/occupational/enterprise/personnel/transferPosition', 
    method: 'get',
    params: query
  })
}

// 查看疑似职业病报告
export function getIndustrialDisease(query) {
  return request({
    url: '/occupational/enterprise/personnel/suspectDisease', 
    method: 'get',
    params: query
  })
}

//查看诊断委托材料
export function getDiagnosisContracts(query) {
  return request({
    url: '/occupational/enterprise/personnel/diagnoseProxy', 
    method: 'get',
    params: query
  })
}

// 查看任命书
export function getAppointBook(query) {
  return request({
    url: '/occupational/enterprise/personnel/getById', 
    method: 'get',
    params: query
  })
}

// 职业卫生管理自查表
export function getSanitationRegulate(query) {
  return request({
    url: '/occupational/enterprise/selfExam/list', 
    method: 'get',
    params: query
  })
}
 
// 职业病危害风险等级判定表
export function getRankDecision(query) {
  return request({
    url: '/occupational/enterprise/diseaseRisk/list', 
    method: 'get',
    params: query
  })
}

// 职业病综合风险评估报告
export function getRickEvaluation(query) {
  return request({
    url: '/occupational/enterprise/compositeRisk/list', 
    method: 'get',
    params: query
  })
}

// 接触职业病危害因素人员
export function getEducationTouch(query) {  
  return request({
    url: '/occupational/enterprise/training/contact/list', 
    method: 'get',
    params: query
  })
}

// 主要负责人和职业卫生管理人员
export function getEducationPerson(query) {
  return request({
    url: '/occupational/enterprise/training/manage/list', 
    method: 'get',
    params: query
  })
}

//  教育培训  详情
export function getEducationTraining(query) { 
  return request({
    url: '/occupational/enterprise/training/' + query, 
    method: 'get',
    params: {}
  })
}
// 教育培训  详情
export function getTrainingPersonnel(query) {
  return request({
    url: '/occupational/enterprise/training/personnel/list', 
    method: 'get',
    params: query
  })
}


// 职业病危害申报记录
export function getOccupationalJeopardize(query) {
  return request({
    url: '/occupational/hazardReport/list', 
    method: 'get',
    params: query
  })
}

//双随机任务列表
export function getDoubleRandom(query) {
  return request({
    url: '/occupational/doubleRandomTask/list', 
    method: 'get',
    params: query
  })
}

// 双随机任务 查看详情
export function getHazardReport(query) {
  return request({
    url: '/occupational/hazardReport/' + query, 
    method: 'get',
    // params: query
  })
}

// 双随机任务  导入
export function getLeadInto(data) {
  return request({
    url: '/occupational/doubleRandomTask/importTask', 
    method: 'post',
    data: data
  })
}

// 双随机任务  下载导入模板
export function getDownloadTemplate(query) {
  return request({
    url: '/occupational/doubleRandomTask/downloadTemplate', 
    method: 'get',
    params: query
  })
}

// 抽查任务列表
export function getSpotCheck(query) {
  return request({
    url: '/occupational/spotCheckTask/list', 
    method: 'get',
    params: query
  })
}

// 随机生成  抽查任务
export function getRandomGenPreView(query) {
  return request({
    url: '/occupational/spotCheckTask/randomGenPreView', 
    method: 'get',
    params: query
  })
}

// 保存 随机生成
export function getSaveRandomGen(data) {
  return request({
    url: '/occupational/spotCheckTask/randomGen?cacheKey=' + data.cacheKey + '&planCompletionTime=' + data.planCompletionTime, 
    method: 'post',
    data: {}
  })
}


//  配置比例   抽查任务
export function getDisposition(query) {
  return request({
    url: '/occupational/spotCheckTask/getPercent', 
    method: 'get',
    params: query
  })
}

// 确认  抽查任务
export function getSaveScale(data) {
  return request({
    url: '/occupational/spotCheckTask/setPercent?percent=' + data.percent, 
    method: 'post',
    data: {}
  })
}

// 检查任务  列表
export function getCheckTask(query) { 
  return request({
    url: 'occupational/inspectTask/list', 
    method: 'get',
    params: query
  })
}

// 检查任务 保存
export function getSaveInspectTask(data) {
  return request({
    url: '/occupational/inspectTask/addTask?enterpriseIdList', 
    method: 'post',
    data: data
  })
}

// 监督文书管理  列表
export function getSupervisoryInstrument(query) { 
  return request({
    url: '/occupational/supervisionDocument/list', 
    method: 'get',
    params: query
  })
}

// 监督文书  删除
export function supervisionWritDelete(data) { 
  return request({
    url: '/occupational/supervisionDocument/delete/'+ data.id, 
    method: 'post',
    data:{}
  })
}

//新建存在职业危害企业管理  列表
export function getHazardEnterprise(query) { 
  return request({
    url: '/occupational/hazardEnterprise/list', 
    method: 'get',
    params: query
  })
}

// 新建存在职业危害企业管理 改扩材料
export function getModifiedMaterial(query) {   
  return request({
    url: '/occupational/hazardEnterprise/adjustReport/' + query, 
    method: 'get',
    params: {}
  })
}

// 新建存在职业危害企业管理 审核改扩材料
export function examineMaterial(data) {   
  return request({  
    url: '/occupational/hazardEnterprise/auth', 
    method: 'post',
    data: data
  })
}

// 防护用品库 列表



// 防护用品入库记录
export function getStorageRecord(query) {
  return request({
    url: '/occupational/protectiveEquipment/entry/list', 
    method: 'get',
    params: query
  })
}

// 防护用品出库记录
export function getOutboundRecord(query) {
  return request({
    url: '/occupational/protectiveEquipment/outbound/list', 
    method: 'get',
    params: query
  })
}





// 监管人员下拉
export function getSupervisorList(query) {
  return request({
    url: '/system/user/supervisorUserList', 
    method: 'get',
    params: query
  })
}

















